<!DOCTYPE html>
<html>
<head>
<style>
.pagination {
  display: inline-block; 
}

.pagination a {
  color: black;
  float: left;
  padding: 8px 16px;
  text-decoration: none;
  border: 1px solid #ddd; /* Gray */
  margin: 0 4px; /* 上下外边距为 0，可灵活修改 */
}

.pagination a.active {
  background-color: #4CAF50;
  color: white;
}

.pagination a:hover:not(.active) {background-color: #ddd;}
</style>
</head>
<body>

<h1>活动的可悬停分页</h1>

<p>请把鼠标移动到数字上：</p>

<div class="pagination">
  <a href="#">«</a>
  <a href="#">1</a>
  <a class="active" href="#">2</a>
  <a href="#">3</a>
  <a href="#">4</a>
  <a href="#">5</a>
  <a href="#">6</a>
  <a href="#">»</a>
</div>

</body>
</html>
